<template>
    <div>
<!--        帮我取页面-->

        <!--        表格 -->
        <el-table :cell-style="rowStyle"
                  :data="orderHelpSource.data.list"
                  :header-cell-style="{'background-color':'#409EFF', color:'#fff'}"
                  border
                  style="width: 100%">
            <el-table-column
                    fixed
                    align="center"
                    prop=""
                    label="订单ID"
                    width="85">
            </el-table-column>
            <el-table-column
                    align="center"
                    prop=""
                    label="用户手机号"
                    width="100">
            </el-table-column>
            <el-table-column
                    align="center"
                    prop=""
                    label="昵称"
                    width="90">
            </el-table-column>
            <el-table-column
                    align="center"
                    prop=""
                    label="收货地址"
                    width="100">
            </el-table-column>
            <el-table-column
                    align="center"
                    prop=""
                    label="取件码图片"
                    width="100">
            </el-table-column>
            <el-table-column
                    align="center"
                    prop=""
                    label="备注信息"
                    width="100">
            </el-table-column>
            <el-table-column
                    align="center"
                    prop=""
                    label="取货点"
                    width="100">
            </el-table-column>
            <el-table-column
                    align="center"
                    prop=""
                    label="取货地址"
                    width="100">
            </el-table-column>
            <el-table-column
                    align="center"
                    prop=""
                    label="下单时间"
                    width="100">
            </el-table-column>
            <el-table-column
                    align="center"
                    prop=""
                    label="状态"
                    width="100">
            </el-table-column>
            <el-table-column
                    align="center"
                    fixed="right"
                    label="操作"
                    width="95">
                <template slot-scope="scope">
                    <el-button @click="handleClick(scope.row)" type="text" size="small"></el-button>
                    <el-button type="text" size="small"></el-button>
                    <el-button type="text" size="small"></el-button>
                </template>
            </el-table-column>
        </el-table>

        <div class="block">
            <el-pagination @current-change="pageChange" :current-page="page"
                           layout="prev, pager, next"
                           :total="orderHelpSource.data.total">
            </el-pagination>
        </div>
    </div>
</template>

<script>
    export default {
        name: "OrderHelpMeTake",
        data:function () {
            return {
                orderHelpSource: "",
                page: 1,
            }
        },
        created() {
            this.axios.request("deliveryOrder/queryDeliveryOrderList", {
                params: {
                    pageNum: 1,
                    pageSize: 10,
                    orderType: 2,
                    userPhone: '',
                    shopName: '',
                    status: 0,
                    userName: '',
                    startTime: '',
                    endTime: '',
                }
            }).then((res) => {
                this.orderHelpSource = res.data;
                console.log(this.orderHelpSource)

            }).catch((err) => {
                console.log(err)
            });
        },
        methods: {
            // 表格内容居中
            rowStyle(){
                return "text-align: center";
            },
            // 点击页码切换页面数据内容
            pageChange(val){
                // console.log(val)
                this.page = val;
                this.axios.request("community/communityList", {
                    params: {
                        name: "",
                        startTime: "",
                        endTime: "",
                        pageNum: val,
                        pageSize: 10,
                        communityName: "",
                    }
                }).then((res) => {
                    this.CommunityData = res.data;
                }).catch((err) => {
                    console.log(err)
                });
            },
        }
    }
</script>

<style scoped>

</style>